<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/common_setting_unit.php");         // 引入通用的设置文件 ?>
<?php include_once($_SERVER['DOCUMENT_ROOT']."/controller/common/module/head.php"); // 引入通用的头部 ?>
<?php include_once("../controller/catalog_maker.php");                     // 当前页面的控制器 ?>



<body>

<!--顶部栏-->
<div id="topbar"> <?php include $_SERVER['DOCUMENT_ROOT'] . '/controller/common/module/topbar.php'; ?></div>

<!--容器-->
<div id="container" class="<?php echo $now_extender ?>">

<!--侧边栏-->
<div id="sidebar"><?php include $_SERVER['DOCUMENT_ROOT'] . '/controller/common/module/sidebar.php'; ?></div>





        <?php
        //==============================================================================
        //这里开始才是平常开发需要注重的部分，其余的基本不用理会
        //==============================================================================
        ?>

  
        <div id="content" class="layui-form">

            <!--标题设定-->
            <?php $page_title=$this_plate['name'].'画册制作';?>
            <?php include $_SERVER['DOCUMENT_ROOT']. '/controller/common/module/mod-page-title.php'; ?>

            <!--搜索框-->
            <?php include 'module/mod-search.php'; ?>


            <div class="catalog cover"> </div>
            <div class="catalog introduce"> </div>
            <div class="catalog menu">
                <ul class="categoty">


                    <table class="layui-table layui-form category_list">

                        <tbody>
                        <?php foreach ($category as $k => $v) { ?>

                        <tr id="item<? echo $v['nid'] ?>"
                            class="category_01 <?if(!in_array($v['nid'],$category_search_result_id_list)){echo "passive";}?>">


                            <td>
                                <div class="icon" id="icon<? echo $v['nid'] ?>">
                                    <? if ($v['icon']) {
                                        $icon = "/uploadfiles/" . $v['icon'];
                                    } else {
                                        $icon = "/controller/common/asset/image/no_image.jpg";
                                    } ?>

                                    <img src="<? echo $icon ?>"
                                         style="object-fit: contain; width: 100%;height: 100%"
                                         onclick="layer_show_by_id('<? echo 'icon' . $v['nid'] ?>')">
                                </div>
                            </td>

                            <td>
                                <div class="els2">
                                    <span class="category_name_01"><? echo $v['name'] ?></span>
                                </div>
                            </td>



                        </tr>


                        <!--二级目录开始循环-->

                        <?
                        if (is_array($v['level2']))
                        {

                        foreach ($v['level2'] as $val2) {


                        ?>
                        <tr class="children_of_<? echo $v['nid'] ?>  category_02
                <?if(!in_array($val2['nid'],$category_search_result_id_list)){echo "passive";}?>"
                            id="item<? echo $val2['nid'] ?>">


                            <td>
                                <div class="icon" id="icon<? echo $val2['nid'] ?>">
                                    <? if ($val2['icon']) {
                                        $icon = "/uploadfiles/" . $val2['icon'];
                                    } else {
                                        $icon = "/controller/common/asset/image/no_image.jpg";
                                    } ?>

                                    <img src="<? echo $icon ?>"
                                         style="object-fit: contain; width: 100%;height: 100%"
                                         onclick="layer_show_by_id('<? echo 'icon' . $val2['nid']
                                         ?>')">
                                </div>
            </div>
            </td>
            <td>


                <span class="category_name_01"><? echo $v['name'] ?></span> > <span class="category_name_02"><? echo $val2['name'] ?></span>
            </td>





            </tr>

            <!--3级目录开始循环-->
            <?
            if (is_array($val2['level3']))
            {
            foreach ($val2['level3'] as $val3)
            {

            ?>
            <tr id="item<? echo $val3['nid'] ?>"
                class="children_of_<? echo $val2['nid'] ?> category_03
                    <?if(!in_array($val3['nid'],$category_search_result_id_list)){echo "passive";}?>">

                <td id="<? echo $val3['nid'] ?>" class="layui-table-cell">
                    <input type="checkbox" name="nid[]" lay-skin="primary" lay-filter="item_checkbox"
                           value="<? echo $val3['nid'] ?>">
                </td>
                <td>
                    <div class="icon" id="icon<? echo $val3['nid'] ?>">
                        <? if ($val3['icon']) {
                            $icon = "/uploadfiles/" . $val3['icon'];
                        } else {
                            $icon = "/controller/common/asset/image/no_image.jpg";
                        } ?>

                        <img src="<? echo $icon ?>"
                             style="object-fit: contain; width: 100%;height: 100%"
                             onclick="layer_show_by_id('<? echo 'icon' . $val3['nid']
                             ?>')">
                    </div>
        </div>
    </td>
    <td>

        <span class="category_name_01"><? echo $v['name'] ?></span> >
        <span class="category_name_02"><? echo $val2['name'] ?></span> >
        <span class="category_name_03"><? echo $val3['name'] ?></span>
    </td>



    </tr>

    <!--3级目录开始循环-->
    <!--3级目录开始循环-->
    <!--3级目录开始循环-->
<? } ?>




<? } ?>
<? } ?>
<? ;} ?>


<?php ;} ?>



    </tbody>
    </table>





    </ul>
            </div>
            <div class="catalog page"> </div>
            <div class="catalog back_cover"> </div>



        </div>
        <!--content端點01-->
        <?
        //==============================================================================
        //这里上面才是平常开发需要注重的部分，下面的基本不用理会，只有底部JS部分需要根据实际情况去加载
        //==============================================================================
        ?>





<br class="clearfloat"/>
<!--container-->
</div>




</body>
</html>
